import readline from "readline";

const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});

/**
 * 
 * P R E G U N T A S
 * 
 */

const Questions = [
    {
        "pregunta": "¿El lenguaje Python es interpretado?",
        "solutions": ["Si"]
    },
    {
        "pregunta": "¿HTML es un lenguaje de programación?",
        "solutions": ["No"]
    },
    {
        "pregunta": "¿Java y JavaScript son el mismo lenguaje?",
        "solutions": ["No"]
    },
    {
        "pregunta": "¿Un byte consta de 8 bits?",
        "solutions": ["Si"]
    },
    {
        "pregunta": "Lenguaje principal para desarrollo Android.",
        "solutions": ["Java"]
    },
    {
        "pregunta": "¿CSS se usa para estilizar páginas web?",
        "solutions": ["Si"]
    },
    {
        "pregunta": "Herramienta de control de versiones creada por Linus Torvalds.",
        "solutions": ["Git"]
    },
    {
        "pregunta": "¿El término \"bug\" se refiere a un error en el código?",
        "solutions": ["Si"]
    },
    {
        "pregunta": "Lenguaje famoso por su uso en inteligencia artificial.",
        "solutions": ["Python"]
    },
    {
        "pregunta": "¿JSON es un formato para el intercambio de datos?",
        "solutions": ["Si"]
    },
    {
        "pregunta": "Tipo de dato para almacenar texto en la mayoria de los lenguajes.",
        "solutions": ["String"]
    },
    {
        "pregunta": "¿Los arrays inician con el indice 1 en C?",
        "solutions": ["No"]
    },
    {
        "pregunta": "Sistema operativo desarrollado por Microsoft.",
        "solutions": ["Windows"]
    },
    {
        "pregunta": "¿El término \"IDE\" se refiere a un editor de código avanzado?",
        "solutions": ["Si"]
    },
    {
        "pregunta": "Protocolo utilizado para transferir páginas web.",
        "solutions": ["HTTP"]
    },
    {
        "pregunta": "¿La recursividad implica que una función se llame a si misma?",
        "solutions": ["Si"]
    },
    {
        "pregunta": "Lenguaje que utiliza \"gemas\".",
        "solutions": ["Ruby"]
    },
    {
        "pregunta": "¿El término \"API\" significa \"Aplicación de Programación de Interfaces\"?",
        "solutions": ["No"]
    },
    {
        "pregunta": "¿\"HTML\" es un acrónimo de \"Hyper Text Markup Language\"?",
        "solutions": ["Si"]
    }
]

/**
 * 
 *  P A N T A L L A S,
 *  A N I M A C I O N E S,
 *  H A B I T A C I O N E S, 
 *  L O G I C A
 * 
 */

/**
 * 
 * @param {Array} frames 
 * @param {number} delayPerFrame 
 * @param {Function} finished 
 * @description Esta funcion muestra las animaciones y al terminar ejecuta un callback...
 */
const Animation = ( frames, delayPerFrame, finished ) => {
    let i = 0;

    const newFrame = () => {
        setTimeout(() => {
            console.clear();
            console.log(frames[i].join("\n"));

            i += 1;
            if( i < frames.length ) {
                newFrame();
                return
            }

            if( i >= frames.length ) setTimeout(() => finished(), delayPerFrame);
        },delayPerFrame);
    }

    newFrame();
}

// Ubicaciones de las habitaciones...
const Rooms = [
    [4, 2],[10, 2],[16, 2],[22, 2],
    [4, 5],[10, 5],[16, 5],[22, 5],
    [4, 8],[10, 8],[16, 8],[22, 8],
    [4, 11],[10, 11],[16, 11],[22, 11],];

// Pantallas Estaticas...
const Map = [
    "🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫",
    "🚪🟧🟧🟧🟨🟨🟨🟧🟧🟧🟨🟨🟨🟫",
    "🟫🟧🟧🟧🟨🟨🟨🟧🟧🟧🟨🟨🟨🟫",
    "🟫🟧🟧🟧🟨🟨🟨🟧🟧🟧🟨🟨🟨🟫",
    "🟫🟨🟨🟨🟧🟧🟧🟨🟨🟨🟧🟧🟧🟫",
    "🟫🟨🟨🟨🟧🟧🟧🟨🟨🟨🟧🟧🟧🟫",
    "🟫🟨🟨🟨🟧🟧🟧🟨🟨🟨🟧🟧🟧🟫",
    "🟫🟧🟧🟧🟨🟨🟨🟧🟧🟧🟨🟨🟨🟫",
    "🟫🟧🟧🟧🟨🟨🟨🟧🟧🟧🟨🟨🟨🟫",
    "🟫🟧🟧🟧🟨🟨🟨🟧🟧🟧🟨🟨🟨🟫",
    "🟫🟨🟨🟨🟧🟧🟧🟨🟨🟨🟧🟧🟧🟫",
    "🟫🟨🟨🟨🟧🟧🟧🟨🟨🟨🟧🟧🟧🟫",
    "🟫🟨🟨🟨🟧🟧🟧🟨🟨🟨🟧🟧🟧🟫",
    "🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫\n\n"
]

const MainMenu = [
    "🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫",
    "🟫🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟫",
    "🟫🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟫",
    "🟫🟨🟨⬛🟨🟨🟨🟨🟨🟨⬛🟨🟨🟫",
    "🟫🟨🟨⬛⬛⬛🟨🟨⬛⬛⬛🟨🟨🟫",
    "🟫🟨🟨⬛⬛⬛🟨🟨⬛⬛⬛🟨🟨🟫",
    "🟫🟨🟨🟨🟨⬛🟨🟨⬛🟨🟨🟨🟨🟫",
    "🟫🟨🟨⬛🟨🟨🟨🟨🟨🟨⬛🟨🟨🟫",
    "🟫🟨🟨⬛⬛🟨🟨🟨🟨⬛⬛🟨🟨🟫",
    "🟫🟨🟨⬛⬛🟨⬛⬛🟨⬛⬛🟨🟨🟫",
    "🟫🟨🟨🟨⬛⬛⬛⬛⬛⬛🟨🟨🟨🟫",
    "🟫🟨🟨🟨🟨⬛🟨🟨⬛🟨🟨🟨🟨🟫",
    "🟫🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟫",
    "🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫\n\n"
]

//Animaciones que se le pasan a "Animation();"
const StartGame_Frames = [

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜🟨🟨⬛🟨🟨🟨🟨🟨🟨⬛🟨🟨⬜",
        "⬜🟨🟨⬛⬛⬛🟨🟨⬛⬛⬛🟨🟨⬜",
        "⬜🟨🟨⬛⬛⬛🟨🟨⬛⬛⬛🟨🟨⬜",
        "⬜🟨🟨🟨🟨⬛🟨🟨⬛🟨🟨🟨🟨⬜",
        "⬜🟨🟨⬛🟨🟨🟨🟨🟨🟨⬛🟨🟨⬜",
        "⬜🟨🟨⬛⬛🟨🟨🟨🟨⬛⬛🟨🟨⬜",
        "⬜🟨🟨⬛⬛🟨⬛⬛🟨⬛⬛🟨🟨⬜",
        "⬜🟨🟨🟨⬛⬛⬛⬛⬛⬛🟨🟨🟨⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜🟨🟨⬛⬛⬛🟨🟨⬛⬛⬛🟨🟨⬜",
        "⬜🟨🟨🟨🟨⬛🟨🟨⬛🟨🟨🟨🟨⬜",
        "⬜🟨🟨⬛🟨🟨🟨🟨🟨🟨⬛🟨🟨⬜",
        "⬜🟨🟨⬛⬛🟨🟨🟨🟨⬛⬛🟨🟨⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "🚪⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜🟨🟨🟨🟧🟧🟧🟨🟨🟨🟧🟧🟧⬜",
        "⬜🟨🟨🟨🟧🟧🟧🟨🟨🟨🟧🟧🟧⬜",
        "⬜🟧🟧🟧🟨🟨🟨🟧🟧🟧🟨🟨🟨⬜",
        "⬜🟧🟧🟧🟨🟨🟨🟧🟧🟧🟨🟨🟨⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "🚪⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜🟨🟨🟨🟧🟧🟧🟨🟨🟨🟧🟧🟧⬜",
        "⬜🟨🟨🟨🟧🟧🟧🟨🟨🟨🟧🟧🟧⬜",
        "⬜🟨🟨🟨🟧🟧🟧🟨🟨🟨🟧🟧🟧⬜",
        "⬜🟧🟧🟧🟨🟨🟨🟧🟧🟧🟨🟨🟨⬜",
        "⬜🟧🟧🟧🟨🟨🟨🟧🟧🟧🟨🟨🟨⬜",
        "⬜🟧🟧🟧🟨🟨🟨🟧🟧🟧🟨🟨🟨⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "🚪⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜🟧🟧🟧🟨🟨🟨🟧🟧🟧🟨🟨🟨⬜",
        "⬜🟧🟧🟧🟨🟨🟨🟧🟧🟧🟨🟨🟨⬜",
        "⬜🟨🟨🟨🟧🟧🟧🟨🟨🟨🟧🟧🟧⬜",
        "⬜🟨🟨🟨🟧🟧🟧🟨🟨🟨🟧🟧🟧⬜",
        "⬜🟨🟨🟨🟧🟧🟧🟨🟨🟨🟧🟧🟧⬜",
        "⬜🟧🟧🟧🟨🟨🟨🟧🟧🟧🟨🟨🟨⬜",
        "⬜🟧🟧🟧🟨🟨🟨🟧🟧🟧🟨🟨🟨⬜",
        "⬜🟧🟧🟧🟨🟨🟨🟧🟧🟧🟨🟨🟨⬜",
        "⬜🟨🟨🟨🟧🟧🟧🟨🟨🟨🟧🟧🟧⬜",
        "⬜🟨🟨🟨🟧🟧🟧🟨🟨🟨🟧🟧🟧⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ]
]

const CorrectAnswerFrames = [

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛🟩⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛🟩⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛🟩⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛🟩⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛🟩⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛🟩⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛🟩⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛🟩⬛🟩⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛🟩⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛🟩⬛⬛⬛🟩⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛🟩⬛🟩⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛🟩⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛🟩⬛⬛⬛⬛⬜",
        "⬜⬛⬛🟩⬛⬛⬛🟩⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛🟩⬛🟩⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛🟩⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛🟩⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛🟩⬛⬛⬛⬛⬜",
        "⬜⬛⬛🟩⬛⬛⬛🟩⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛🟩⬛🟩⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛🟩⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛🟩⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛🟩⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛🟩⬛⬛⬛⬛⬜",
        "⬜⬛⬛🟩⬛⬛⬛🟩⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛🟩⬛🟩⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛🟩⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬛⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬛⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬛⬜⬜⬜⬛⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬛⬜⬛⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬛⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛\n\n"
    ],

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛🟩⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛🟩⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛🟩⬛⬛⬛⬛⬜",
        "⬜⬛⬛🟩⬛⬛⬛🟩⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛🟩⬛🟩⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛🟩⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬛⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬛⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬛⬜⬜⬜⬛⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬛⬜⬛⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬛⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛\n\n"
    ],

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛🟩⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛🟩⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛🟩⬛⬛⬛⬛⬜",
        "⬜⬛⬛🟩⬛⬛⬛🟩⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛🟩⬛🟩⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛🟩⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬛⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬛⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬛⬜⬜⬜⬛⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬛⬜⬛⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬛⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛\n\n"
    ]
]

const Death_Frames = [
    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬜⬜⬜⬜⬜⬜⬛⬛⬛⬜",
        "⬜⬛⬛⬜⬜⬜⬜⬜⬜⬜⬜⬛⬛⬜",
        "⬜⬛⬛⬜⬜⬜⬜⬜⬜⬜⬜⬛⬛⬜",
        "⬜⬛⬛⬜⬛⬛⬜⬜⬛⬛⬜⬛⬛⬜",
        "⬜⬛⬛⬜⬜⬛⬜⬜⬛⬜⬜⬛⬛⬜",
        "⬜⬛⬛⬛⬜⬜⬜⬜⬜⬜⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬜⬜⬜⬜⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬜⬜⬜⬜⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬛⬛⬛⬛⬛⬛⬜⬜⬜⬛",
        "⬛⬜⬜⬛⬛⬛⬛⬛⬛⬛⬛⬜⬜⬛",
        "⬛⬜⬜⬛⬛⬛⬛⬛⬛⬛⬛⬜⬜⬛",
        "⬛⬜⬜⬛⬜⬜⬛⬛⬜⬜⬛⬜⬜⬛",
        "⬛⬜⬜⬛⬛⬜⬛⬛⬜⬛⬛⬜⬜⬛",
        "⬛⬜⬜⬜⬛⬛⬛⬛⬛⬛⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬛⬛⬛⬛⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬛⬛⬛⬛⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛\n\n"
    ],

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬜⬜⬜⬜⬜⬜⬛⬛⬛⬜",
        "⬜⬛⬛⬜⬜⬜⬜⬜⬜⬜⬜⬛⬛⬜",
        "⬜⬛⬛⬜⬜⬜⬜⬜⬜⬜⬜⬛⬛⬜",
        "⬜⬛⬛⬜⬛⬛⬜⬜⬛⬛⬜⬛⬛⬜",
        "⬜⬛⬛⬜⬜⬛⬜⬜⬛⬜⬜⬛⬛⬜",
        "⬜⬛⬛⬛⬜⬜⬜⬜⬜⬜⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬜⬜⬜⬜⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬜⬜⬜⬜⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬛⬛⬛⬛⬛⬛⬜⬜⬜⬛",
        "⬛⬜⬜⬛⬛⬛⬛⬛⬛⬛⬛⬜⬜⬛",
        "⬛⬜⬜⬛⬛⬛⬛⬛⬛⬛⬛⬜⬜⬛",
        "⬛⬜⬜⬛⬜⬜⬛⬛⬜⬜⬛⬜⬜⬛",
        "⬛⬜⬜⬛⬛⬜⬛⬛⬜⬛⬛⬜⬜⬛",
        "⬛⬜⬜⬜⬛⬛⬛⬛⬛⬛⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬛⬛⬛⬛⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬛⬛⬛⬛⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛\n\n"
    ],

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬜⬜⬜⬜⬜⬜⬛⬛⬛⬜",
        "⬜⬛⬛⬜⬜⬜⬜⬜⬜⬜⬜⬛⬛⬜",
        "⬜⬛⬛⬜⬜⬜⬜⬜⬜⬜⬜⬛⬛⬜",
        "⬜⬛⬛⬜⬛⬛⬜⬜⬛⬛⬜⬛⬛⬜",
        "⬜⬛⬛⬜⬜⬛⬜⬜⬛⬜⬜⬛⬛⬜",
        "⬜⬛⬛⬛⬜⬜⬜⬜⬜⬜⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬜⬜⬜⬜⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬜⬜⬜⬜⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬛⬛⬛⬛⬛⬛⬜⬜⬜⬛",
        "⬛⬜⬜⬛⬛⬛⬛⬛⬛⬛⬛⬜⬜⬛",
        "⬛⬜⬜⬛⬛⬛⬛⬛⬛⬛⬛⬜⬜⬛",
        "⬛⬜⬜⬛⬜⬜⬛⬛⬜⬜⬛⬜⬜⬛",
        "⬛⬜⬜⬛⬛⬜⬛⬛⬜⬛⬛⬜⬜⬛",
        "⬛⬜⬜⬜⬛⬛⬛⬛⬛⬛⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬛⬛⬛⬛⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬛⬛⬛⬛⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛\n\n"
    ],

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬜⬜⬜⬜⬜⬜⬛⬛⬛⬜",
        "⬜⬛⬛⬜⬜⬜⬜⬜⬜⬜⬜⬛⬛⬜",
        "⬜⬛⬛⬜⬜⬜⬜⬜⬜⬜⬜⬛⬛⬜",
        "⬜⬛⬛⬜⬛⬛⬜⬜⬛⬛⬜⬛⬛⬜",
        "⬜⬛⬛⬜⬜⬛⬜⬜⬛⬜⬜⬛⬛⬜",
        "⬜⬛⬛⬛⬜⬜⬜⬜⬜⬜⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬜⬜⬜⬜⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬜⬜⬜⬜⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬛⬛⬛⬛⬛⬛⬜⬜⬜⬛",
        "⬛⬜⬜⬛⬛⬛⬛⬛⬛⬛⬛⬜⬜⬛",
        "⬛⬜⬜⬛⬛⬛⬛⬛⬛⬛⬛⬜⬜⬛",
        "⬛⬜⬜⬛⬜⬜⬛⬛⬜⬜⬛⬜⬜⬛",
        "⬛⬜⬜⬛⬛⬜⬛⬛⬜⬛⬛⬜⬜⬛",
        "⬛⬜⬜⬜⬛⬛⬛⬛⬛⬛⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬛⬛⬛⬛⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬛⬛⬛⬛⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛\n\n"
    ],

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬜⬜⬜⬜⬜⬜⬛⬛⬛⬜",
        "⬜⬛⬛⬜⬜⬜⬜⬜⬜⬜⬜⬛⬛⬜",
        "⬜⬛⬛⬜⬜⬜⬜⬜⬜⬜⬜⬛⬛⬜",
        "⬜⬛⬛⬜⬛⬛⬜⬜⬛⬛⬜⬛⬛⬜",
        "⬜⬛⬛⬜⬜⬛⬜⬜⬛⬜⬜⬛⬛⬜",
        "⬜⬛⬛⬛⬜⬜⬜⬜⬜⬜⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬜⬜⬜⬜⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬜⬜⬜⬜⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ]
]

const Error_Frames = [

    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛\n\n"
    ],
    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛\n\n"
    ],
    [
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬜",
        "⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜\n\n"
    ],

    [
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛",
        "⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛\n\n"
    ]

]

const Winner_Frames = [
    [
        "🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫",
        "🟫🍭🟧🍭🟧🍭🟧🍭🟧🍭🟧🍭🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫\n\n"
    ],
    
    [
        "🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🟧🍭🟧🍭🟧🍭🟧🍭🟧🍭🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫\n\n"
    ],
    
    [
        "🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🟧🍭🟧🍭🟧🍭🟧🍭🟧🍭🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫\n\n"
    ],
    
    [
        "🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🟧🍭🟧🍭🟧🍭🟧🍭🟧🍭🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟧🟫",
        "🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫\n\n"
    ],
    
    [
        "🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🍭🟫",
        "🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫🟫\n\n"
    ]


]

/**
 * 
 * 
 *  L O G I C A
 * 
 * 
 */

class World {
    constructor(){
        this.player_position = [4, 2]

        this.rooms = Rooms;

        this.game_status = {
            started: false,
            current_room: 0,
            enigma: false,
            candy_position: this.rooms[Math.floor(Math.random() * 15) + 1],
            warning: ""
        }

        this.map_base = MainMenu;
        this.render();

        rl.question("\x1b[35m" + "Comenzar Juego? | SI/NO : ", ( answer ) => {
            if(answer.toLowerCase() == "si") {
                Animation( StartGame_Frames, 50, () => {
                    this.map_base = Map;
                    this.game_status.started = true;
                    this.message("\x1b[36m" + `Te encuentras explorando una mansión abandonada llena de habitaciones.
        * En cada habitación tendrás que resolver una pregunta para poder avanzar a la siguiente.
        * Tu misión es encontrar la habitación de los dulces.`);
                    this.render();
                });
            }else {
                process.exit();
            }
        });
    }

    /**
     * @description actualiza el tablero...
     */
    render() {
        console.clear();

        //Ganar si el caramelo esta en la misma habitacion del jugador...
        if( this.player_position === this.game_status.candy_position ){
            this.Win();
            return;
        }

        //Coloca los emojis en su lugar...
        for (let y = 0; y < this.map_base.length; y++) {
            let row = "";
            for (let x = 0; x < this.map_base[y].length; x += 2) {
                if (x == this.player_position[0] && y == this.player_position[1] && this.game_status.started ) {
                    row += "🕺";
                } else {
                    row += this.map_base[y].slice(x, x + 2);
                }
            }
            console.log(row);
        }

        //Si hay un mensaje de aviso mostrarlo...
        if(this.game_status.warning != "" || null || undefined){
            console.log('\x1b[31m', `[AVISO]: ${this.game_status.warning}\n\n`);
            this.game_status.warning = "";
        }

        //Si el juego inicio y no hay pregunta -> preguntar a donde moverse.
        if(this.game_status.started && !this.game_status.enigma) {
            rl.question("\x1b[32m" + "Hacia donde quieres moverte? [w: ↑,s: ↓ ,d: → ,a: ← ]: ", ( answer ) => {
                this.moveRelative(answer.toLowerCase())
            });
        }
    }

    /**
     * 
     * @param {int} id 0 - 15 
     * @description Mueve al jugador a una habitacion especifica...
     */
    moveToRoom(id) {
        this.game_status.enigma = true;
        this.render();

        this.newQuestion(id);
    }

    /**
     * 
     * @param {String} text
     * @description Enviar avisos al usuario...
     */
    message( text ) {
        this.game_status.warning = text;
    }

    /**
     * 
     * @param {String} text 
     * @description Arrojar errores y avisar al usuario con una animacion de error...
     */
    error( text ) {
        Animation(Error_Frames, 100, () => {
            this.message(text);
            this.render();
        });
    }

    /**
     * 
     * @param {String} direction 
     * @description Mueve al jugador relativo a su habitacion actual...
     */
    moveRelative( direction ) {
        const directions = {
            "w": this.game_status.current_room - 4,
            "s": this.game_status.current_room + 4,
            "a": this.game_status.current_room - 1,
            "d": this.game_status.current_room + 1
        }

        //Verificar que sea una posicion disponible dentro de la mansion...
        if( directions[direction] >= 0 && directions[direction] <= 15 ){
            if( direction !== "right" && direction !== "left" ) {
                this.moveToRoom(directions[direction]);
                return;
            }

            if( direction == "right" && (this.game_status.current_room + 1) % 4 !== 0 
                || direction == "left" && this.game_status.current_room % 4 !== 0
            ){
                this.moveToRoom(directions[direction]);
                return;
            }
            this.error("Que intentas? no puedes atravesar paredes 💀");

            return;
        }

        //De no poder moverse a la direccion solicitada arrojar error...
        this.error("Que intentas? no puedes atravesar paredes 💀");
    }

    /**
     * 
     * @param {number} id 
     * @description Nueva pregunta al jugador...
     */
    newQuestion(id) {
        const min = Math.ceil(0);
        const max = Math.floor(Questions.length);
        const index = Math.floor(Math.random() * (max - min)) + min;

        rl.question("\x1b[35m" + `[PREGUNTA] ${Questions[index].pregunta} : `, ( respuesta ) => {
            
            if( Questions[index].solutions.some( solution => solution.toLowerCase() == respuesta.toLowerCase() ) ){
                Animation(CorrectAnswerFrames, 100, () => {
                    this.player_position = this.rooms[id];
                    this.game_status.current_room = id;
                    this.game_status.enigma = false;
                    this.render();
                })
            }else {
                Animation(Death_Frames, 100, () => {
                    rl.question( "\x1b[0m" + `Oops! la respuesta era "${Questions[index].solutions[0]}" HAS MUERTO 💀, Quieres volver a intentarlo? : `, ( answer ) => {
                        if( answer.toLowerCase() == "si"){
                            Game.iniciar();
                        }else {
                            process.exit();
                        }
                    });
                });
            }

        })
    }
    
    /**
     * 
     * @description Lo Que Sucede Al Encontrar la habitacion de los caramelos...
     */
    Win() {
        Animation( Winner_Frames, 200, () => {
            rl.question("🍭HAS GANADO!!🍭 encontraste la habitacion de los caramelos!\n\nQuieres Volver A Jugar?: ", ( answer ) => {
                if( answer.toLowerCase() == "si" ){
                    Game.iniciar();
                }else {
                    process.exit();
                }
            });
        });
    }
}

/**
 * 
 *  S T A R T    A P P L I C A T I O N
 * 
 */

let the_world;

const Game = {
    iniciar: function() {
        the_world = new World();
    }
}

Game.iniciar();